<!--分页组件-->
<#macro pagination page url="">
    <#assign pageNo=(page.pageNo)!1 pageSize=(page.pageSize)!20  totalCount=(page.totalCount)!0  >
        <#assign  totalPage=(page.totalPage)!1 >
        <nav class="navigation paging" role="navigation">
            <div>
                <input type="hidden" id="pageNo" name="pageNo" class="page-no" value="${pageNo}" />
                <input type="hidden" id="pageSize" name="pageSize" class="page-size" value="${pageSize}" />
                <input type="hidden" id="totalCount" name="totalCount" class="page-totalCount" value="${totalCount}" />
                <input type="hidden" id="totalPage" name="totalPage" class="page-totalPage" value="${page.totalPage()}" />
            </div>
            <#if page.totalPage() == 0>
                <div>没有记录</div>
                <#else>
                    <div class="page-info pull-left">共${totalCount}条 / 共${page.totalPage()}页</div>
                    <ul class="pagination pull-right no-margin">
                        <#assign pagingSize = 7>
                            <!-- 首页 -->
                            <#if (page.totalPage() > pagingSize)>
                                <#if pageNo == 1>
                                    <li class="first disabled"><a class="pageA" pageNo="0" >首页</a></li>
                                    <#else>
                                        <li class="first" data-page-no="1"><a class="pageA" pageNo="1" >首页</a></li>
                                </#if>
                            </#if>

                            <!-- 上一页 -->
                            <#if pageNo == 1>
                                <li class="previous disabled"><a class="pageA" pageNo="0" >上一页</a></li>
                                <#else>
                                    <li class="previous" data-page-no="${pageNo-1}"><a class="pageA" pageNo="${pageNo-1}" >上一页</a></li>
                            </#if>

                            <!-- 不能全部显示 -->
                            <#if (page.totalPage() > pagingSize)>
                                <#assign startPage = pageNo - (pagingSize / 2) ? floor>
                                    <#if (startPage < 1)>
                                    <#assign startPage = 1>
                            </#if>

                            <#assign endPage = startPage + pagingSize - 1>

                                <#if (endPage > page.totalPage())>
                                    <#assign endPage = page.totalPage() startPage = page.totalPage() - pagingSize + 1>
                                </#if>
                                <#else>
                                    <#assign startPage = 1 endPage = page.totalPage()>
            </#if>

            <!-- ... -->
            <#if (page.totalPage() > pagingSize && startPage != 1)>
                <li class="extend disabled"><a class="pageA" pageNo="0" >...</a></li>
            </#if>

            <#list startPage..endPage as i>
                <#if pageNo == i>
                    <!-- 当前页 -->
                    <li class="current active"><a class="pageA" pageNo="0" >${i}</a></li>
                    <#else>
                        <li class="" data-page-no="${i}"><a class="pageA" pageNo="${i}" >${i}</a></li>
                </#if>

            </#list>

            <!-- ... -->
            <#if (page.totalPage() > pagingSize && endPage != page.totalPage())>
                <li class="extend disabled"><a class="pageA" pageNo="0"  >...</a></li>
            </#if>

            <!-- 下一页 -->
            <#if pageNo == page.totalPage()>
                <li class="next disabled"><a  class="pageA" pageNo="0" >下一页</a></li>
                <#else>
                    <li class="next" data-page-no="${pageNo+1}"><a  class="pageA" pageNo="${pageNo+1}" >下一页</a></li>
            </#if>

            <!-- 尾页 -->
            <#if (page.totalPage() > pagingSize)>
                <#if pageNo == page.totalPage()>
                    <li class="last disabled"><a  class="pageA" pageNo="0"  >尾页</a></li>
                    <#else>
                        <li class="last" data-page-no="${page.totalPage()}"><a  class="pageA" pageNo="${page.totalPage()}" >尾页</a></li>
                </#if>
            </#if>
            </ul>
            </#if>
        </nav>
</#macro>